/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'export',

  eslint: {
    ignoreDuringBuilds: true,
  },

  typescript: {
    ignoreBuildErrors: true,
  },

  images: {
    unoptimized: true,
  },

  // basePath: '/your-app-name',

  // trailingSlash: true,

  // 配置实验性功能以支持大文件上传
  experimental: {
    // 增加请求体大小限制到 100MB
    serverActions: {
      bodySizeLimit: '100mb',
    },
    // 添加中间件客户端最大请求体大小限制
    middlewareClientMaxBodySize: '100mb',
  },

  async rewrites() {
    return [
      {
        source: '/api/:path*',
        destination: 'http://localhost:8080/api/:path*',
      },
    ]
  },
}

export default nextConfig
